package com.awenhui.commonweb.config.properties;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * app节点配置信息
 *
 * @author zxiaozhou
 * @date 2020-06-29 00:25
 * @since JDK11
 */
@Getter
@Setter
@ToString
@Component
@ConfigurationProperties(prefix = "app")
public class AppProperty implements Serializable {
    private static final long serialVersionUID = 713575253040294540L;

    /**
     * 运行环境
     */
    @Value("${spring.profiles.active}")
    private String active = "dev";

    /**
     * 服务名称
     */
    @Value("${spring.application.name}")
    private String serviceName;

    /**
     * 请求前缀
     */
    @Value("${server.servlet.context-path:/}")
    private String contentPath;

    /**
     * 请求端口
     */
    @Value("${server.port:8080}")
    private String port;
}
